package com.weipai.education.dao;

import com.weipai.education.model.ApplicationUser;
import com.weipai.education.model.User;

import java.util.List;
import java.util.Map;

/**
 * @Author: 曹朋飞
 * @Date: 2018/12/10 15:50
 */
public interface UserDao {
    int update(User user);

    int insert(User user);

    User selectByPrimaryKey(String id);

    List<Map<String, Object>> list(Integer start, Integer size,
                                   Integer userCateId, String key, String userId);

    List<Map<String, Object>> Mylist(Integer start, Integer size,
                                     Integer userCateId, String key, String userId);

    Integer listAmount(Integer userCateId, String key, String userId);

    Integer MylistAmount(Integer userCateId, String key, String userId);

    int batchDeleteById(String[] id);

    List<User> getUserByRoleId(String roleId);

    User getUserByMobile(String mobile);

    Integer saveApplicationUser(ApplicationUser applicationUser);

    int getUserByAccountNumber(String accountNumber);

    User getUserModelByAccountNumber(String referrerAccountNumber);


    List<Map<String, Object>> searchAccountNumber(String accountNumber);

    List<Map<String, Object>> applicationUserList(Integer start, Integer size, Integer userCateId,
                                                  String key, String isAudit, String userId);

    Integer applicationUserAmount(Integer userCateId, String key, String isAudit, String userId);

    ApplicationUser selectApplicationUserByPrimaryKey(String id);

    int updateApplicationUser(ApplicationUser applicationUser);

    Integer allListAmount(Integer userCateId, String key);

    Map<String, Object> getUserInfoByUserId(String userId);

    int updateByPrimaryKeySelective(User user);

    User getCityCountyUser(String province,String city, String county, int flag);

    List<Map<String, Object>> userList(Integer start, Integer size, Integer roleId, String key);

    Integer userListAmount(Integer roleId, String key);

    int verifyUserByAddress(Integer flag, String province, String city, String county);

    User getUserByAddress(Integer flag, String province, String city, String county);

    List<Map<String, Object>> getUserByAddressAndFlag(String province, String city, int flag2, int flag1);

    Integer getUserByAddressAndFlagAmount(String province, String city, Integer userCateId, int flag2, int flag1, String key);

    List<Map<String, Object>> getUserByAddressAndFlagTwo(Integer start, Integer end, Integer userCateId, String province, String city, int flag2, int flag1, String key);

}
